<!--
 * @Descripttion: 
 * @version: 
 * @Author: dxiaoxing
 * @Date: 2020-07-03 11:02:26
 * @LastEditors: dxiaoxing
 * @LastEditTime: 2020-07-13 11:45:23
-->
<!DOCTYPE html>
<html lang="en">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>Document</title>
</head>

<body>
  <div id="app">
    <h2>{{person.name}} --- {{person.age}}</h2>
    <h3>{{person.fav}}</h3>
    <h3>{{person.a.b}}</h3>
    <ul>
      <li>1</li>
      <li>2</li>
      <li>3</li>
    </ul>
    <h3>{{msg}}</h3>
    <div v-text="msg"></div>
    <div v-text="person.fav"></div>
    <div v-html="htmlStr"></div>
    <input type="text" v-model="msg">
    <button v-on:click="click111">按钮on</button>
    <button @click="click111">按钮@</button>
  </div>
  <script src="./MVue.js"></script>
  <script src="./Observer.js"></script>
  <script>
    let vm = new MVue({
      el: '#app',
      data: {
        person: {
          name: '星哥',
          age: 18,
          fav: '姑娘',
          a: {
            b: '787878'
          }
        },
        msg: '学习MVVM实现原理',
        htmlStr: '<h4>大家学的怎么样</h4>',
      },
      methods: {
        click111() {
          console.log(this)
          this.person.name = '学习MVVM'
          // this.$data.person.name = '学习MVVM'
        }
      }
    })
  </script>
  
</body>

</html>